package com.mingyuan.library.domain.lending.patron.event;


import com.mingyuan.library.domain.common.event.DomainEvent;
import com.mingyuan.library.domain.lending.patron.model.valueobject.PatronId;
import io.vavr.collection.List;

import java.util.UUID;

/**
 * 读者事件
 * @author yangzk
 * @date 2023/12/28 18:05
 **/
public interface PatronEvent extends DomainEvent {

    default PatronId patronId() {
        return new PatronId(getPatronId());
    }

    UUID getPatronId();

    default UUID getAggregateId() {
       return getPatronId();
    }

    default List<DomainEvent> normalize() {
        return List.of(this);
    }























}



